#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int MoreThanHalfNum_Solution(int* numbers, int numbersLen)
{
    // write code here
    int a[10001] = { 0 };
    for (int i = 0; i < numbersLen; ++i)
    {
        a[numbers[i]]++;
    }
    for (int j = 0; j < 10001; ++j)
    {
        if (a[j] > numbersLen / 2)
        {
            return j;
        }
    }
    return 0;
}
int main()
{
    int a[10] = { 1,5,4,7,8,5,5,5,5,5 };
    int ret=MoreThanHalfNum_Solution(a,10);
    printf("%d", ret);
    return 0;
}